<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <meta http-equiv="x-dns-prefetch-control" content="on">

    <title>下单选车</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css">
     <script src="../../js/jquery-v1.11.2.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../js/customer.js"></script>
</head>
<body>
<div id="listDiv">

</div>
<form id="trackForm" name="trackForm"  method="post">
	<input type="hidden" id="vehiclePriceId" name="vehiclePriceId" value=""/>
     <input type="hidden" id="bookDate" name="bookDate" value=""/>
     <input type="hidden" id="consignDesc" name="consignDesc" value=""/>
     <input type="hidden" id="callType" name="callType" value=""/>
     <input type="hidden" id="addrType" name="addrType" value=""/>
     <input type="hidden" id="waybillRquirement10" name="waybillRquirement10" value=""/>
	 <input type="hidden" id="waybillRquirement20" name="waybillRquirement20" value=""/>
	 <input type="hidden" id="waybillRquirement30" name="waybillRquirement30" value=""/>
	      <input type="hidden" id="consignName" name="consignName" value=""/>
     <input type="hidden" id="consignMobile" name="consignMobile" value=""/>
	 
	 <input type="hidden" id="startDistrictCode" name="startDistrictCode" value=""/>
	 <input type="hidden" id="startAddr" name="startAddr" value=""/>
	 <!--startPCD 起点 省市区-->
	 <input type="hidden" id="startPCD" name="startPCD" value=""/>
	 <!-- 起点经纬度 -->
	 <input type="hidden" id="startLocation" name="startLocation" value=""/>
	 
	 <input type="hidden" id="endDistrictCode" name="endDistrictCode" value=""/>
	 <input type="hidden" id="endAddr" name="endAddr" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD" name="endPCD" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation" name="endLocation" value=""/>
	 
	  <!-- 第二终点参数 -->
	 <input type="hidden" id="endDistrictCode1" name="endDistrictCode1" value=""/>
	 <input type="hidden" id="endAddr1" name="endAddr1" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD1" name="endPCD1" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation1" name="endLocation1" value=""/>
	 
	 <!-- 第三终点参数 -->
	 <input type="hidden" id="endDistrictCode2" name="endDistrictCode2" value=""/>
	 <input type="hidden" id="endAddr2" name="endAddr2" value=""/>
	 <!--startPCD  省市区-->
	 <input type="hidden" id="endPCD2" name="endPCD2" value=""/>
	 <!-- 终点经纬度 -->
	 <input type="hidden" id="endLocation2" name="endLocation2" value=""/>
	 
	 
	 <input type="hidden" id="goodsRemark" name="goodsRemark" value=""/>
	 <input type="hidden" id="goodsType" name="goodsType" value=""/>
	  <input type="hidden" id="goodsTypeName" name="goodsTypeName" value=""/>
	 <input type="hidden" id="consignNum" name="consignNum" value=""/>
	 <input type="hidden" id="endAddrCount" name="endAddrCount" value=""/>
	 <input type="hidden" id="customerUuid" name="customerUuid" />

 	<input type="hidden" id="startStreet" name="startStreet" />
	 <input type="hidden" id="startCross" name="startCross" />
	 <input type="hidden" id="startDoorNo" name="startDoorNo" />
	 <input type="hidden" id="endStreet" name="endStreet" />
	 <input type="hidden" id="endCross" name="endCross" />
	 <input type="hidden" id="endDoorNo" name="endDoorNo" />
	 <input type="hidden" id="acceptPersonMobile" name="acceptPersonMobile" />
	 <input type="hidden" id="acceptPersonName" name="acceptPersonName" />
	 
	  <input type="hidden" id="endStreet1" name="endStreet1" />
	 <input type="hidden" id="endCross1" name="endCross1" />
	 <input type="hidden" id="endDoorNo1" name="endDoorNo1" />
	 <input type="hidden" id="acceptPersonMobile1" name="acceptPersonMobile1" />
	 <input type="hidden" id="acceptPersonName1" name="acceptPersonName1" />
	 
	 <input type="hidden" id="endStreet2" name="endStreet2" />
	 <input type="hidden" id="endCross2" name="endCross2" />
	 <input type="hidden" id="endDoorNo2" name="endDoorNo2" />
	 <input type="hidden" id="acceptPersonMobile2" name="acceptPersonMobile2" />
	 <input type="hidden" id="acceptPersonName2" name="acceptPersonName2" />
	 
	 <input type="hidden" id="planLoadTime" name="planLoadTime" />
	 <input type="hidden" id="planUnloadTime" name="planUnloadTime" />
	 <input type="hidden" id="planLoadFee" name="planLoadFee" />
	 <input type="hidden" id="planUnloadFee" name="planUnloadFee" />
	 <input type="hidden" id="planLowSpeedTime" name="planLowSpeedTime" />
	 <input type="hidden" id="planLowSpeedFee" name="planLowSpeedFee" />
</form>
</body>
<script>
$(function (){
	 //token验证
		checkToken();
	}); 
$(function(){
	try{
		delegate.getCurrentLocation();
	}catch(e){
			alert(e);
	}
	var LocString = String(window.document.location.href); 
	var callType=GetArgsFromHref("callType"); 
	var fromType=GetArgsFromHref("fromType"); 
	//请求来源--首页
	if(fromType=="INDEX"){
		//清空订单信息
		 clearOrderCookie();
	}else{
		//先取订单信息到页面
		cookie2Order();
	}
	//'customerUuid':customerUuid
	var customerUuid=getCookie("customerUuid")
	
	 var url = _global.serverHost + "/consignerIndex/selectTrack.htm";
     var data = {
    	'callType':callType,
    	'customerUuid':customerUuid
     };
     $("#callType").val(callType);
     _callAjaxRequest(url, data, callBack);

     function callBack(data) {
    	 var listDivHtml='';
    	 var trackList=data.trackList;
    	 
    	 if(trackList==null || trackList.length<1){
    		 listDivHtml="暂无数据";
    	 }else{
    		 for(var i=0;i<trackList.length;i++){
    			 
    			 listDivHtml=listDivHtml+'<section class="itemgroup mt10" onclick="selectedTrack('+trackList[i].id+')">';
    			 
    			 if(trackList[i].vehicleType=='10'){
    				 listDivHtml= listDivHtml+'<div class="trackphoto ml15"><img src="../../img/small_car.png" width="100%" height="100%"/></div>';
    			 }else if(trackList[i].vehicleType=='20'){
    				 listDivHtml= listDivHtml+'<div class="trackphoto ml15"><img src="../../img/center_car.png" width="100%" height="100%"/></div>';
    			 }else if(trackList[i].vehicleType=='30'){
    				 listDivHtml= listDivHtml+'<div class="trackphoto ml15"><img src="../../img/big_car.png" width="100%" height="100%"/></div>';
    			 }
    			 listDivHtml= listDivHtml+' <div class="photoitem lh24">'
    			        +'<div class="itemname">'
    			       + trackList[i].vehicleTypeName
    			        + '<div class="right tr"><label class="red mr5">'+trackList[i].price+'</label><label class="font12">'+trackList[i].unit+'/'+trackList[i].pv5+'公里</label></div>'
    			        +'</div>'
    			        +'<div class="itemsubname mt3">载重:'+trackList[i].pv1+'吨';
    			        var vehiclePriceId =$("#vehiclePriceId").val();
    			        if(vehiclePriceId==trackList[i].id){
    			        	
    			        	listDivHtml= listDivHtml  +'<i class="iconfont rightsmallicon_red">&#xe6da;</i>'
    			        }else{
    			        	listDivHtml= listDivHtml  +'<i class="iconfont rightsmallicon">&#xe6db;</i></div>';
    			        }
    			       
    			        listDivHtml= listDivHtml  +'<div class="itemsubname">长*宽*高:'+trackList[i].pv2+'</div>'
    			        +'<div class="itemsubname">超公里费: '+trackList[i].pv3+'元/公里</div>'
    			        +'</div>'
    			        +'</section>';
    		 }
    	 }
    	 $("#listDiv").html(listDivHtml);
     }
})


 function selectedTrack(vehiclePriceId){
	 $("#vehiclePriceId").val(vehiclePriceId);
	 order2Cookie();
	  var callType=$("#callType").val();
	  if(callType=='NOW'){
			  window.location.href="../"+_global.custNowOrderUrl;
	  }else{
		  window.location.href="../"+_global.custBookOrderUrl;
	  }
 }



</script>
</html>